/**
 * 节点类型Map，值对应后端数据
 */
const NodeType = {
  // 场景库
  sceneNode: 'SCENE_NODE',
  // 服务库
  serviceNode: 'SERVICE_NODE',
  // TSP服务
  tspNode: 'TSP_NODE',
  // 生态服务
  thirdNode: 'THIRD_NODE',
  // 交互库
  interactiveNode: 'INTERACTIVE_NODE',
  // 高级
  advancedNode: 'ADVANCED_NODE',
  // 开始节点
  startNode: 'START_NODE',
  // 流程控制节点
  flowNode: 'FLOW_NODE',
  // 未知节点
  unknownNode: 'unknownNode'
}

const NodeConfig = {
  [NodeType.sceneNode]: {
    nodeClass: 'scene-node'
  },
  [NodeType.serviceNode]: {
    nodeClass: 'service-node'
  },
  [NodeType.tspNode]: {
    nodeClass: 'tsp-node'
  },
  [NodeType.thirdNode]: {
    nodeClass: 'third-node'
  },
  [NodeType.interactiveNode]: {
    nodeClass: 'interactive-node'
  },
  [NodeType.advancedNode]: {
    nodeClass: 'advanced-node'
  },
  [NodeType.startNode]: {
    name: '开始',
    description: '设置初始节点相关配置',
    nodeClass: 'start-node',
    icon: '开始'
  },
  [NodeType.flowNode]: {
    nodeClass: 'flow-node'
  },
  [NodeType.unknownNode]: {
    name: '未知',
    description: '该节点未定义',
    nodeClass: 'unknown-node'
  }
}

const StageType = {
  startStage: 'start-stage-node',
  endStage: 'end-stage-node'
}

export {
  NodeType,
  NodeConfig,
  StageType
}
